<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 微信地区数据表迁移
 */
class CreateWxArea extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //微信地区数据
        Schema::create('wx_areas', function (Blueprint $table) {
            $table->increments('id')->comment('地区ID');
            $table->unsignedInteger('parent_id')->default(0)->comment('父级菜单ID');
            $table->string('name', 50)->default('')->comment('地区名称');
            $table->string('name_en', 100)->default('')->comment('菜英文名称');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::dropIfExists('wx_areas');
    }
}
